#pragma once
#include <stdio.h>
#include "stdafx.h" 

template <typename TElem>
class TStack
{
protected:
	long len;
public:
	TStack(void){};
	virtual ~TStack(void){};
	long GetLen(void){return len;}
    char IsEmpty(){return(len<=0)?1:0;}
	virtual TElem& Push(TElem &elem)=0;
	virtual TElem& Pop(void)=0;
	virtual TElem& GetTop(void)=0;
	virtual TElem& Rolldown()=0;
	virtual TElem& RollUp()=0;
	virtual void Clear()=0;
};
